<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>个人信息</title>
    <script type="text/javascript" src="../static/jquery-easyui-1.5.5/jquery.min.js"></script>
    <link rel="stylesheet" type="text/css" href="../static/jquery-easyui-1.5.5/themes/bootstrap/easyui.css">
    <link rel="stylesheet" type="text/css" href="../static/jquery-easyui-1.5.5/themes/icon.css">
    <link rel="stylesheet" type="text/css" href="../static/toastr/toastr.min.css">
    <script type="text/javascript" src="../static/jquery-easyui-1.5.5/jquery.easyui.min.js"></script>
    <script type="text/javascript" src="../static/jquery-easyui-1.5.5/locale/easyui-lang-zh_CN.js"></script>
    <script type="text/javascript" src="../static/js/book/manage.js"></script>
    <script type="text/javascript" src="../static/js/custom.js"></script>
    <script type="text/javascript" src="../static/toastr/toastr.min.js"></script>
    <script type="text/javascript" src="../static/js/validate.js"></script>
</head>
<body>
<div style="margin: 280px 35%">
<form action="save" method="post" id="ff">
    <input name="id" data-th-value="${model.id}" type="hidden">
    <input name="role" data-th-value="${role}" type="hidden">
        <input id="username" name="username" data-th-value="${model.username}" class="easyui-textbox" data-options="
        width: 250,
        label: '用户名',
        labelPosition: 'before',
        labelAlign: 'right',
        required: true,
        readonly: true
    ">
    </p>
    <p><input name="name" data-th-value="${model.name}" class="easyui-textbox" data-options="
        width: 250,
        label: '姓名',
        labelPosition: 'before',
        labelAlign: 'right',
        prompt: '请输入姓名',
        required: true,
        missingMessage: '您还没有输入姓名呃~~',
    "></p>
    <p><input name="email" data-th-value="${model.email}" class="easyui-textbox" data-options="
        width: 250,
        label: '邮箱',
        labelPosition: 'before',
        labelAlign: 'right',
        prompt: '请输入邮箱~~',
        required: true,
        validType: 'email',
        invalidMessage: '请您输入正确的邮箱地址哦~~',
        missingMessage: '您还没有输入邮箱呃~~',
    "></p>
    <p><input name="phone" data-th-value="${model.phone}" class="easyui-textbox" data-options="
        width: 250,
        label: '电话',
        labelPosition: 'before',
        labelAlign: 'right',
        prompt: '请输入联系电话',
        required: true,
        validType: 'mobileOrphone',
        missingMessage: '您还没有输入电话号码呃~~',
    "></p>
    <div id="btn">
        <a class="easyui-linkbutton" href="#">确定修改</a>
    </div>
</form>
<script type="text/javascript">
$(function() {
	   $('#btn a').click(function() {
        console.log('你点击额');
        $('#ff').form('submit', {
        	url: 'save',
        	success: function(data) {
        		var data = eval('(' + data + ')');
        		if(data.success) {
        			console.log(data.msg);
        			toastr.success(data.msg); 
        		} else {
        			console.log(data.success);
        			toastr.error(data.msg); 
        		}
			}
        });
    });
});


</script>
</div>
</body>
</html>